package com.boyunv.bridge;

/*
 *@description  -------
 *
 *@author boyunv
 *@create 2023/7/2 9:25
 *@version 1.0
 */

import com.boyunv.bridge.example01.PayController;
import com.boyunv.bridge.example02.Pay;
import com.boyunv.bridge.example02.PayFaceMode;
import com.boyunv.bridge.example02.WxPay;
import org.junit.Test;

import java.math.BigDecimal;

public class TestProxy {
    @Test
    public  void  testStaticProxy(){
        //
        PayController payController = new PayController();
        System.out.println("测试微信---->人脸支付");
        payController.doPay("wx001","1000001",new BigDecimal(100),1,2);
        System.out.println("测试支付宝---->指纹支付");
        payController.doPay("zfb002","1000001",new BigDecimal(100),2,3);
    }

    @Test
    public void  test02(){
        System.out.println("测试场景1:WeChat,Face");
        Pay wxPay=new WxPay(new PayFaceMode());
        wxPay.transfer("wx_00001","1000001",new BigDecimal(100));
        System.out.println("测试场景1:ZfbChat,Face");
        Pay ZFBPay=new WxPay(new PayFaceMode());
        ZFBPay.transfer("zfb_00002","1000002",new BigDecimal(400));


    }

    public static void main(String[] args) {

    }
}
